package com.supermarket.api.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 店铺表
 * @author 李其伟
 * @date 2023/10/16
 */
@Data
@Entity
@Table(name = "sm_shop")
@org.hibernate.annotations.Table(appliesTo = "sm_shop",comment="店铺表")
public class ShopEntity extends BaseEntity{

    @Column(name = "uscc", columnDefinition = " char(64) not null unique comment '统一社会信用代码' ")
    private String uscc;

    @Column(name = "name", columnDefinition = " varchar(256) not null comment '店铺名称' ")
    private String name;

    @Column(name = "logo", columnDefinition = " varchar(512) comment '店铺logo' ")
    private String logo;

    @Column(name = "big_pic", columnDefinition = " varchar(512) comment '店铺大图' ")
    private String bigPic;

    @Column(name = "shop_status", columnDefinition = " int(11) not null comment '店铺状态 : 0->待审核；1->审核成功；2->审核失败；3->锁定；' ")
    private Integer shopStatus;

    @Column(name = "product_count", columnDefinition = " int(11) comment '产品数量' ")
    private Integer productCount;

    @Column(name = "product_comment_count", columnDefinition = " int(11) comment '产品评论数量' ")
    private Integer productCommentCount;

    @Column(name = "intro", columnDefinition = " varchar(1024) comment '介绍' ")
    private String intro;

    @Column(name = "location", columnDefinition = " varchar(1024) comment '所属地' ")
    private String location;

    @Column(name = "start_time", columnDefinition = " datetime comment '开业时间' ")
    private Date startTime;

    @Column(name = "user_id", columnDefinition = " bigint(20) not null comment '用户主键' ")
    private Long userId;

    @Column(name = "sort", columnDefinition = " int(11) comment '排序' ")
    private Integer sort;
}
